
/*
 * @Descripttion: 物料信息的表
 * @version:
 * @Author: zp
 * @Date: 2019-08-16 09:17:57
 * @LastEditors: cxguo
 * @LastEditTime: 2020-08-24 07:50:54
 */

export default {
  data() {
    return {
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        materialNumber: [
          { required: true, message: "编号不能为空", trigger: "blur" },
        ],
        materialName: [
          { required: true, message: "名称不能为空", trigger: "blur" },
        ],
        unitMeasurementId: [
          { required: true, message: "计量单位不能为空", trigger: "blur" },
        ],
      },
      formData:[
        {
          gutter:24,
          formColData:[
            {
              span:12,
              label:"编号",
              prop:'materialNumber',
              placeholder:'请输入编号',
              type:'input',
            },
            {
              span:12,
              label:"名称",
              prop:'materialName',
              placeholder:'请输入名称',
              type:'input',
              deptOptions:[]
            }
          ]
        },
        {
          gutter:24,
          formColData:[
            {
              span:12,
              label:"规格",
              prop:'specifications',
              placeholder:'请输入规格',
              type:'input',
              deptOptions:[]
            },
            {
              span:12,
              label:"品牌",
              prop:'brand',
              placeholder:'请输入品牌',
              type:'input',
              deptOptions:[]
            }
          ]
        },
        {
          gutter:24,
          formColData:[
            {
              span:12,
              label:"物料类型",
              prop:'materialTypeId',
              placeholder:'请选择物料类型',
              type:'tree',
              deptOptions:[],
            },
            {
              span:12,
              label:"产地",
              prop:'producer',
              placeholder:'请输入产地',
              type:'input',
              deptOptions:[]
            }
          ]
        },
        {
          gutter:24,
          formColData:[
            {
              span:12,
              label:"计量单位",
              prop:'unitMeasurementId',
              placeholder:'请选择计量单位',
              type:'tree',
              deptOptions:[{id:1,label:"KG"},{id:2,label:"G"}],
            },
            {
              span:12,
              label:"供应商",
              prop:'supplierId',
              placeholder:'请选择供应商',
              type:'tree',
              deptOptions:[]
            }
          ]
        },
        {
          gutter:24,
          formColData:[
            {
              span:12,
              label:"采购单价",
              prop:'unitPrice',
              placeholder:'请输入采购单价',
              type:'input',
            },
            {
              span:12,
              label:"条码",
              prop:'barCode',
              placeholder:'请输入条码',
              type:'input',
              deptOptions:[]
            }
          ]
        },
        {
          gutter:24,
          formColData:[
            {
              span:12,
              label:"销售单价",
              prop:'salesPrice',
              placeholder:'请输入销售单价',
              type:'input',
            },
            {
              span:12,
              label:"最低库存",
              prop:'minStock',
              placeholder:'请输入最低库存',
              type:'input',
              deptOptions:[]
            }
          ]
        },
        {
          gutter:24,
          formColData:[
            {
              span:12,
              label:"采购周期",
              prop:'procurementCycle',
              placeholder:'请输入采购周期',
              type:'input',
            },
            {
              span:12,
              label:"重量",
              prop:'weight',
              placeholder:'请输入重量',
              type:'input',
              deptOptions:[]
            }
          ]
        },
        {
          gutter:24,
          formColData:[
            {
              span:12,
              label:"颜色",
              prop:'color',
              placeholder:'请输入颜色',
              type:'input',
            },
            {
              span:12,
              label:"货位",
              prop:'goodsAllocation',
              placeholder:'请输入货位',
              type:'input',
              deptOptions:[]
            }
          ]
        },
        {
          gutter:24,
          formColData:[
            {
              span:12,
              label:"用途",
              prop:'useTo',
              placeholder:'请输入用途',
              type:'input',
            },
            {
              span:12,
              label:"备注",
              prop:'remarks',
              placeholder:'请输入备注',
              type:'input',
              deptOptions:[]
            }
          ]
        },
      ]
    }
  },
  methods: {

  }
}

